{% extends 'index.html' %}
{% load static %}

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>title</title>
    <link href="{% static 'bootstrap-3.3.7-dist/css/bootstrap.min.css' %}" rel="stylesheet">

</head>

<body>

{% block title %}
    <span class="navbar-page-title"> 军事需求知识百科 - 需求百科 - 编辑 </span>
{% endblock %}


{% block content %}
    <div class="wiki-add-edit" style="margin: 20px;background-color: #ffffff;padding:20px">
        <form action="{% url 'add_require_wikipedia' %}" method="post">
            {% csrf_token %}
            <input type="text" name="all_tem" style="display: none;" value="{{ all_tem }}">
            <input type="text" name="id" style="display: none;" value="{{ id }}">

            <div class="row" style="margin-bottom: 30px">
                <div class="col-xs-6 col-md-4">
                    <div class="span-div" style="color:#333333;line-height: 38px;">需求百科名称</div>
					<input type="text" name="card_id" style="display: none;" value="{{ card_id }}">
                </div>
                <div class="col-xs-12 col-md-6">
                    <input type="text" name="name" class="form-control" value="{{ name }}">
                </div>
            </div>

            {% for sg_con in content %}
                <div class="row" style="margin-bottom: 30px">
                    <div class="col-xs-6 col-md-4">
                        <div class="span-div" style="color:#333333;line-height: 38px;">{{ sg_con.key }}</div>
                    </div>
                    <div class="col-xs-12 col-md-6">
                        <textarea class="form-control" name="{{ sg_con.key }}" rows="3">{{ sg_con.value }}</textarea>
                    </div>
                </div>

            {% endfor %}

            <div class="row">
                <div class="col-xs-6 col-md-4">
                </div>
                <div class="col-xs-12 col-md-6">
                    <div style="width: 49%;float: left">
                        <button type="submit" class="my-btn" style="margin-right: 20px">提交</button>
                    </div>
                    <div style="width: 49%;float: left">

                        <button type="button" class="my-btn" onclick="javascript:history.back(-1);">取消</button>
                    </div>

                </div>
            </div>
        </form>

    </div>
{% endblock %}

{% block myjs %}
    <script>
        document.getElementById("jsxqzsbk").style.display = 'block';
        document.getElementById("xqbk").style.backgroundColor = 'rgba(30,21,21,0.44)';
    </script>
    <script type="text/javascript" src="{% static 'js/textareaAutoHeight.js' %}"></script>

{% endblock %}